package com.hangkong.dao;


import com.hangkong.model.Flight;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;


import java.util.Date;
import java.util.List;

@Repository
public interface FlightDao {

    Flight insert(@Param("flightno") String flightno,
                  @Param("deptcity")String deptcity,
                  @Param("arrcity")String arrcity,
                  @Param("flightdate")String flightdate);

    Flight del(@Param("id") Integer id);

    Flight findone(@Param("deptcity")String deptcity,
                   @Param("arrcity")String arrcity,
                    @Param("flightdate")String flightdate);

    List<Flight> getAll();

    List<Flight> select(@Param("deptcity") String deptcity,
                        @Param("arrcity") String arrcity,
                        @Param("flightdate")String flightdate);

    Flight showone(@Param("id") Integer id);

    Flight update(@Param("id") Integer id,
                  @Param("flightno") String flightno,
                  @Param("deptcity") String deptcity,
                  @Param("arrcity") String arrcity);

    String getMaxId();

    Integer findmaxid();

    Integer insertcabf(@Param("mid")Integer maxid, @Param("cabinnamef") String cabinnamef, @Param("cabinpricef") String cabinpricef, @Param("countf") String countf);
    Integer insertcaby(@Param("mid")Integer maxid, @Param("cabinnamey") String cabinnamey, @Param("cabinpricey") String cabinpricey, @Param("county") String county);
    Integer insertcabe(@Param("mid")Integer maxid, @Param("cabinnamee") String cabinnamee, @Param("cabinpricee") String cabinpricee, @Param("counte") String counte);
    Integer insertcabr(@Param("mid")Integer maxid, @Param("cabinnamer") String cabinnamer, @Param("cabinpricer") String cabinpricer, @Param("countr") String countr);
}